﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using HandLab.Mvc3App.Aspx.Models.Entities;
using HandLab.Mvc3App.Aspx.Models.Interfaces;

namespace HandLab.Mvc3App.Aspx.Models.MockModels
{
    public class MockCategoryService : ICategoryService
    {
        void ICategoryService.Add(CategoryInfo category)
        {
            return;
        }

        public void ChangeName(int id, string name)
        {
            return;
        }

        public void Remove(int id)
        {
            return;
        }

        public CategoryInfo GetDetail(int id)
        {
            return new CategoryInfo() { ID = id, Name = "最新公告", };
        }

        public List<CategoryInfo> GetAll()
        {
            List<CategoryInfo> categories = new List<CategoryInfo>();
            for (int i = 1; i <= 5; i++)
            {
                CategoryInfo category = new CategoryInfo
                {
                    ID = i,
                    Name = "通告类别" + i,
                };

                categories.Add(category);
            }
            return categories;
        }
    }
}